<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CapSense Middleware Library 3.0 (Alpha): Low-level Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CapSense Middleware Library 3.0 (Alpha)</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__capsense__low__level.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Low-level Functions</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<p>The Low-level functions represent the lower layer of abstraction in support of <a class="el" href="group__group__capsense__high__level.html">High-level Functions</a>. </p>
<p>These functions also enable implementation of special case designs requiring performance optimization and non-typical functionalities.</p>
<p>All functions are general to all sensing methods. Some of the functions detect the sensing method used by the widget and execute tasks as appropriate. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gafbfe743a98bd2c24a623a2c734c03f0e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__capsense__structures.html#gadb42bb859316b21e708ad01184fba9c7">cy_capsense_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__capsense__low__level.html#gafbfe743a98bd2c24a623a2c734c03f0e">Cy_CapSense_ProcessWidgetExt</a> (uint32_t widgetId, uint32_t mode, <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *context)</td></tr>
<tr class="memdesc:gafbfe743a98bd2c24a623a2c734c03f0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs customized data processing on the selected widget.  <a href="#gafbfe743a98bd2c24a623a2c734c03f0e">More...</a><br /></td></tr>
<tr class="separator:gafbfe743a98bd2c24a623a2c734c03f0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga05d3f6e7d7fbef845ab4eb575e653dec"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__capsense__structures.html#gadb42bb859316b21e708ad01184fba9c7">cy_capsense_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__capsense__low__level.html#ga05d3f6e7d7fbef845ab4eb575e653dec">Cy_CapSense_ProcessSensorExt</a> (uint32_t widgetId, uint32_t sensorId, uint32_t mode, const <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *context)</td></tr>
<tr class="memdesc:ga05d3f6e7d7fbef845ab4eb575e653dec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs customized data processing on the selected sensor.  <a href="#ga05d3f6e7d7fbef845ab4eb575e653dec">More...</a><br /></td></tr>
<tr class="separator:ga05d3f6e7d7fbef845ab4eb575e653dec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga55216d9c145b2ab42d7cec23960fb31e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__capsense__low__level.html#ga55216d9c145b2ab42d7cec23960fb31e">Cy_CapSense_InitializeAllBaselines</a> (<a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *context)</td></tr>
<tr class="memdesc:ga55216d9c145b2ab42d7cec23960fb31e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the baselines of all the sensors of all the widgets.  <a href="#ga55216d9c145b2ab42d7cec23960fb31e">More...</a><br /></td></tr>
<tr class="separator:ga55216d9c145b2ab42d7cec23960fb31e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae217c3d40eff007bf28add89814f17d2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__capsense__low__level.html#gae217c3d40eff007bf28add89814f17d2">Cy_CapSense_InitializeWidgetBaseline</a> (uint32_t widgetId, <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *context)</td></tr>
<tr class="memdesc:gae217c3d40eff007bf28add89814f17d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the baselines of all the sensors in a specific widget.  <a href="#gae217c3d40eff007bf28add89814f17d2">More...</a><br /></td></tr>
<tr class="separator:gae217c3d40eff007bf28add89814f17d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga695fc72a3809224e52c8a0212835d4f7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__capsense__low__level.html#ga695fc72a3809224e52c8a0212835d4f7">Cy_CapSense_InitializeSensorBaseline</a> (uint32_t widgetId, uint32_t sensorId, <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *context)</td></tr>
<tr class="memdesc:ga695fc72a3809224e52c8a0212835d4f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the baseline of a sensor in a widget specified by the input parameters.  <a href="#ga695fc72a3809224e52c8a0212835d4f7">More...</a><br /></td></tr>
<tr class="separator:ga695fc72a3809224e52c8a0212835d4f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1fcb002d0216bb96ab818276954606e7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__capsense__low__level.html#ga1fcb002d0216bb96ab818276954606e7">Cy_CapSense_InitializeAllFilters</a> (const <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *context)</td></tr>
<tr class="memdesc:ga1fcb002d0216bb96ab818276954606e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes (or re-initializes) all the firmware filter history, except the baseline.  <a href="#ga1fcb002d0216bb96ab818276954606e7">More...</a><br /></td></tr>
<tr class="separator:ga1fcb002d0216bb96ab818276954606e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga101174469c4b6a2df8d44bddb0e33fcf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__capsense__low__level.html#ga101174469c4b6a2df8d44bddb0e33fcf">Cy_CapSense_InitializeWidgetFilter</a> (uint32_t widgetId, const <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *context)</td></tr>
<tr class="memdesc:ga101174469c4b6a2df8d44bddb0e33fcf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes (or re-initializes) the raw count filter history of all the sensors in a widget specified by the input parameter.  <a href="#ga101174469c4b6a2df8d44bddb0e33fcf">More...</a><br /></td></tr>
<tr class="separator:ga101174469c4b6a2df8d44bddb0e33fcf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga76d2e232d2e5247954a15a45de62d235"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__capsense__structures.html#gadb42bb859316b21e708ad01184fba9c7">cy_capsense_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__capsense__low__level.html#ga76d2e232d2e5247954a15a45de62d235">Cy_CapSense_UpdateAllBaselines</a> (const <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *context)</td></tr>
<tr class="memdesc:ga76d2e232d2e5247954a15a45de62d235"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the baseline for all the sensors in all the widgets.  <a href="#ga76d2e232d2e5247954a15a45de62d235">More...</a><br /></td></tr>
<tr class="separator:ga76d2e232d2e5247954a15a45de62d235"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga53420b198a6de128b82b3edb31f250c6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__capsense__structures.html#gadb42bb859316b21e708ad01184fba9c7">cy_capsense_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__capsense__low__level.html#ga53420b198a6de128b82b3edb31f250c6">Cy_CapSense_UpdateWidgetBaseline</a> (uint32_t widgetId, const <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *context)</td></tr>
<tr class="memdesc:ga53420b198a6de128b82b3edb31f250c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the baselines for all the sensors in a widget specified by the input parameter.  <a href="#ga53420b198a6de128b82b3edb31f250c6">More...</a><br /></td></tr>
<tr class="separator:ga53420b198a6de128b82b3edb31f250c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4d2ceb23fa0e3731878ad777f39474d2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__capsense__structures.html#gadb42bb859316b21e708ad01184fba9c7">cy_capsense_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__capsense__low__level.html#ga4d2ceb23fa0e3731878ad777f39474d2">Cy_CapSense_UpdateSensorBaseline</a> (uint32_t widgetId, uint32_t sensorId, const <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *context)</td></tr>
<tr class="memdesc:ga4d2ceb23fa0e3731878ad777f39474d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the baseline for a sensor in a widget specified by the input parameters.  <a href="#ga4d2ceb23fa0e3731878ad777f39474d2">More...</a><br /></td></tr>
<tr class="separator:ga4d2ceb23fa0e3731878ad777f39474d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1a42bc8b8c045d4c4fa3ea9b4411c247"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__capsense__low__level.html#ga1a42bc8b8c045d4c4fa3ea9b4411c247">Cy_CapSense_InitializeWidgetGestures</a> (uint32_t widgetId, const <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *context)</td></tr>
<tr class="memdesc:ga1a42bc8b8c045d4c4fa3ea9b4411c247"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs initialization of all gestures for the specified widget.  <a href="#ga1a42bc8b8c045d4c4fa3ea9b4411c247">More...</a><br /></td></tr>
<tr class="separator:ga1a42bc8b8c045d4c4fa3ea9b4411c247"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga91d3ccdc21ed235f4e3b61a0a583c7a1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__capsense__low__level.html#ga91d3ccdc21ed235f4e3b61a0a583c7a1">Cy_CapSense_InitializeAllStatuses</a> (const <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *context)</td></tr>
<tr class="memdesc:ga91d3ccdc21ed235f4e3b61a0a583c7a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs initialization of all statuses and related modules including debounce counters and touch positions of all the widgets.  <a href="#ga91d3ccdc21ed235f4e3b61a0a583c7a1">More...</a><br /></td></tr>
<tr class="separator:ga91d3ccdc21ed235f4e3b61a0a583c7a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0cd8087cced318d7a2ddd0aabe5d0b65"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__capsense__low__level.html#ga0cd8087cced318d7a2ddd0aabe5d0b65">Cy_CapSense_InitializeWidgetStatus</a> (uint32_t widgetId, const <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *context)</td></tr>
<tr class="memdesc:ga0cd8087cced318d7a2ddd0aabe5d0b65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs initialization of all statuses, debounce counters, and touch positions of the specified widget.  <a href="#ga0cd8087cced318d7a2ddd0aabe5d0b65">More...</a><br /></td></tr>
<tr class="separator:ga0cd8087cced318d7a2ddd0aabe5d0b65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1130ee418f843fce4e68832efa37e28f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__capsense__structures.html#gadb42bb859316b21e708ad01184fba9c7">cy_capsense_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__capsense__low__level.html#ga1130ee418f843fce4e68832efa37e28f">Cy_CapSense_CalibrateAllSlots</a> (<a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *context)</td></tr>
<tr class="memdesc:ga1130ee418f843fce4e68832efa37e28f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes the CapDAC calibration for all the sensors in all widgets in the project to defined target values.  <a href="#ga1130ee418f843fce4e68832efa37e28f">More...</a><br /></td></tr>
<tr class="separator:ga1130ee418f843fce4e68832efa37e28f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3a30f2e4cdef59eab57f589b0091d937"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__capsense__structures.html#gadb42bb859316b21e708ad01184fba9c7">cy_capsense_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__capsense__low__level.html#ga3a30f2e4cdef59eab57f589b0091d937">Cy_CapSense_CalibrateAllWidgets</a> (<a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *context)</td></tr>
<tr class="memdesc:ga3a30f2e4cdef59eab57f589b0091d937"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calibrates CapDACs for all widgets.  <a href="#ga3a30f2e4cdef59eab57f589b0091d937">More...</a><br /></td></tr>
<tr class="separator:ga3a30f2e4cdef59eab57f589b0091d937"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga889e60b9ca2470b37b37c772558f44ad"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__capsense__structures.html#gadb42bb859316b21e708ad01184fba9c7">cy_capsense_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__capsense__low__level.html#ga889e60b9ca2470b37b37c772558f44ad">Cy_CapSense_CalibrateWidget</a> (uint32_t widgetId, <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *context)</td></tr>
<tr class="memdesc:ga889e60b9ca2470b37b37c772558f44ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes the CapDAC calibration for all the sensors in the specified widget to the default target value.  <a href="#ga889e60b9ca2470b37b37c772558f44ad">More...</a><br /></td></tr>
<tr class="separator:ga889e60b9ca2470b37b37c772558f44ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab41b4a485cc7909f7ae3add7019e0e23"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__capsense__structures.html#gadb42bb859316b21e708ad01184fba9c7">cy_capsense_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__capsense__low__level.html#gab41b4a485cc7909f7ae3add7019e0e23">Cy_Capsense_SlotPinState</a> (uint32_t slotId, const <a class="el" href="structcy__stc__capsense__electrode__config__t.html">cy_stc_capsense_electrode_config_t</a> *ptrEltdCfg, uint32_t pinState, <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *context)</td></tr>
<tr class="memdesc:gab41b4a485cc7909f7ae3add7019e0e23"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures the desired electrode the the specified state by updating the CapSense configuration.  <a href="#gab41b4a485cc7909f7ae3add7019e0e23">More...</a><br /></td></tr>
<tr class="separator:gab41b4a485cc7909f7ae3add7019e0e23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa89c8ed15cddd778c2232c85300eb02d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__capsense__structures.html#gadb42bb859316b21e708ad01184fba9c7">cy_capsense_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__capsense__low__level.html#gaa89c8ed15cddd778c2232c85300eb02d">Cy_CapSense_GetParam</a> (uint32_t paramId, uint32_t *value, const void *ptrTuner, const <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *context)</td></tr>
<tr class="memdesc:gaa89c8ed15cddd778c2232c85300eb02d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets a value of the specified parameter from the cy_capsense_tuner structure.  <a href="#gaa89c8ed15cddd778c2232c85300eb02d">More...</a><br /></td></tr>
<tr class="separator:gaa89c8ed15cddd778c2232c85300eb02d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6049654627a08e866ebe5e93ac414177"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__capsense__structures.html#gadb42bb859316b21e708ad01184fba9c7">cy_capsense_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__capsense__low__level.html#ga6049654627a08e866ebe5e93ac414177">Cy_CapSense_SetParam</a> (uint32_t paramId, uint32_t value, void *ptrTuner, <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *context)</td></tr>
<tr class="memdesc:ga6049654627a08e866ebe5e93ac414177"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a new value for the specified parameter in cy_capsense_tuner structure.  <a href="#ga6049654627a08e866ebe5e93ac414177">More...</a><br /></td></tr>
<tr class="separator:ga6049654627a08e866ebe5e93ac414177"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2de812825cd421ee05fec733206e157a"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__capsense__low__level.html#ga2de812825cd421ee05fec733206e157a">Cy_CapSense_GetCRC</a> (const uint8_t *ptrData, uint32_t len)</td></tr>
<tr class="memdesc:ga2de812825cd421ee05fec733206e157a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates CRC for the specified buffer and length.  <a href="#ga2de812825cd421ee05fec733206e157a">More...</a><br /></td></tr>
<tr class="separator:ga2de812825cd421ee05fec733206e157a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="gafbfe743a98bd2c24a623a2c734c03f0e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafbfe743a98bd2c24a623a2c734c03f0e">&#9670;&nbsp;</a></span>Cy_CapSense_ProcessWidgetExt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__capsense__structures.html#gadb42bb859316b21e708ad01184fba9c7">cy_capsense_status_t</a> Cy_CapSense_ProcessWidgetExt </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>widgetId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Performs customized data processing on the selected widget. </p>
<p>This function performs customized data processing specified by the mode parameter on a widget. This function can be used with any of the available scan functions. This function should be called only after all the sensors in the specified widget are scanned. Calling this function multiple times with the same mode without new sensor scan causes unexpected behavior. This function ignores the value of the wdgtEnable register.</p>
<p>The CY_CAPSENSE_PROCESS_CALC_NOISE and CY_CAPSENSE_PROCESS_THRESHOLDS masks for mode parameter are supported only when SmartSense is enabled for CSD widgets.</p>
<p>The execution order of processing tasks starts from LSB to MSB of the mode parameter. To implement a different order of execution, call this function multiple times with the required mode parameter.</p>
<p>For more details, refer to function usage example below.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">widgetId</td><td>Specifies the ID number of the widget. A macro for the widget ID can be found in the cycfg_capsense.h file defined as CY_CAPSENSE_&lt;WIDGET_NAME&gt;_WDGT_ID.</td></tr>
    <tr><td class="paramname">mode</td><td>Specifies the type of widget processing to be executed for the specified widget:<ol type="1">
<li>Bits [31..6] - Reserved.</li>
<li>Bits [5..0] - CY_CAPSENSE_PROCESS_ALL - Execute all of the below tasks.</li>
<li>Bit [5] - CY_CAPSENSE_PROCESS_STATUS - Update the status (on/off, centroid position).</li>
<li>Bit [4] - CY_CAPSENSE_PROCESS_THRESHOLDS - Update the thresholds (only in CSD auto-tuning mode).</li>
<li>Bit [3] - CY_CAPSENSE_PROCESS_CALC_NOISE - Calculate the noise (only in CSD auto-tuning mode).</li>
<li>Bit [2] - CY_CAPSENSE_PROCESS_DIFFCOUNTS - Update the difference counts of each sensor.</li>
<li>Bit [1] - CY_CAPSENSE_PROCESS_BASELINE - Update the baselines for all sensor.</li>
<li>Bit [0] - CY_CAPSENSE_PROCESS_FILTER - Run the firmware filters on sensor rawcounts.</li>
</ol>
</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the CapSense context structure <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns the status of the widget processing operation:<ul>
<li>CY_CAPSENSE_STATUS_SUCCESS - The processing is successfully performed.</li>
<li>CY_CAPSENSE_STATUS_BAD_PARAM - The input parameter is invalid.</li>
<li>CY_CAPSENSE_STATUS_BAD_DATA - The processing failed.</li>
</ul>
</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd></dd></dl>
<p>An example of customized data processing, changed processing order: </p><div class="fragment"><div class="line"></div><div class="line">    <span class="comment">/*...*/</span></div><div class="line">    <span class="comment">/* Standard execution order (SmartSense is disabled):</span></div><div class="line"><span class="comment">    * - Filtering</span></div><div class="line"><span class="comment">    * - Baselining</span></div><div class="line"><span class="comment">    * - Difference calculation</span></div><div class="line"><span class="comment">    * - Status / Position calculation</span></div><div class="line"><span class="comment">    *</span></div><div class="line"><span class="comment">    * An example below makes a different order:</span></div><div class="line"><span class="comment">    * - filtering is executed as a last task</span></div><div class="line"><span class="comment">    */</span></div><div class="line">    <a class="code" href="group__group__capsense__low__level.html#gafbfe743a98bd2c24a623a2c734c03f0e">Cy_CapSense_ProcessWidgetExt</a>(CY_CAPSENSE_TOUCHPAD0_WDGT_ID,</div><div class="line">                                <a class="code" href="group__group__capsense__macros__process.html#ga459185fc700d0afc4556d995730f6052">CY_CAPSENSE_PROCESS_BASELINE</a> |</div><div class="line">                                <a class="code" href="group__group__capsense__macros__process.html#ga69cbf309ed5306c0845fbef6d31ba3e8">CY_CAPSENSE_PROCESS_DIFFCOUNTS</a> |</div><div class="line">                                <a class="code" href="group__group__capsense__macros__process.html#ga1575721ebbdd600b13f843e068dbf282">CY_CAPSENSE_PROCESS_STATUS</a>,</div><div class="line">                                &amp;cy_capsense_context);</div><div class="line">    <a class="code" href="group__group__capsense__low__level.html#gafbfe743a98bd2c24a623a2c734c03f0e">Cy_CapSense_ProcessWidgetExt</a>(CY_CAPSENSE_TOUCHPAD0_WDGT_ID,</div><div class="line">                                <a class="code" href="group__group__capsense__macros__process.html#gaa3b890d5a6646b1c990093614f904b7c">CY_CAPSENSE_PROCESS_FILTER</a>,</div><div class="line">                                &amp;cy_capsense_context);</div><div class="line">    <span class="comment">/*...*/</span></div><div class="line"></div></div><!-- fragment -->
</div>
</div>
<a id="ga05d3f6e7d7fbef845ab4eb575e653dec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga05d3f6e7d7fbef845ab4eb575e653dec">&#9670;&nbsp;</a></span>Cy_CapSense_ProcessSensorExt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__capsense__structures.html#gadb42bb859316b21e708ad01184fba9c7">cy_capsense_status_t</a> Cy_CapSense_ProcessSensorExt </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>widgetId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>sensorId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Performs customized data processing on the selected sensor. </p>
<p>This function performs customized data processing specified by the mode parameter on a sensor. This function performs the exact same task of the <a class="el" href="group__group__capsense__low__level.html#gafbfe743a98bd2c24a623a2c734c03f0e" title="Performs customized data processing on the selected widget. ">Cy_CapSense_ProcessWidgetExt()</a> function but only on the specified sensor instead of all sensors in the widget.</p>
<p>The pipeline scan method (i.e. during scanning of a sensor, processing of a previously scanned sensor is performed) can be implemented using this function and it may reduce the total scan/process time, increase the refresh rate, and decrease the power consumption. For more details, refer to function usage example below.</p>
<dl class="section note"><dt>Note</dt><dd>This function does not perform raw count deconvolition for widgets with multi-phase Tx. The Cy_CapSense_ProcessWidgetMptxDeconvolution() function must be called manually from application layer before data processing perfomed by this function.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">widgetId</td><td>Specifies the ID number of the widget. A macro for the widget ID can be found in the cycfg_capsense.h file defined as CY_CAPSENSE_&lt;WIDGET_NAME&gt;_WDGT_ID.</td></tr>
    <tr><td class="paramname">sensorId</td><td>Specifies the ID number of the sensor within the widget. A macro for the sensor ID within a specified widget can be found in the cycfg_capsense.h file defined as CY_CAPSENSE_&lt;WIDGET_NAME&gt;_SNS&lt;SENSOR_NUMBER&gt;_ID.</td></tr>
    <tr><td class="paramname">mode</td><td>Specifies the type of the sensor processing that must be executed for the specified sensor:<ol type="1">
<li>Bits [31..5] - Reserved</li>
<li>Bits [4..0] - CY_CAPSENSE_PROCESS_ALL - Executes all the tasks</li>
<li>Bit [4] - CY_CAPSENSE_PROCESS_THRESHOLDS - Updates the thresholds (only in auto-tuning mode)</li>
<li>Bit [3] - CY_CAPSENSE_PROCESS_CALC_NOISE - Calculates the noise (only in auto-tuning mode)</li>
<li>Bit [2] - CY_CAPSENSE_PROCESS_DIFFCOUNTS - Updates the diff count</li>
<li>Bit [1] - CY_CAPSENSE_PROCESS_BASELINE - Updates the baseline</li>
<li>Bit [0] - CY_CAPSENSE_PROCESS_FILTER - Runs the firmware filters</li>
</ol>
</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the CapSense context structure <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns the status of the sensor process operation:<ul>
<li>CY_CAPSENSE_STATUS_SUCCESS - The processing is successfully performed.</li>
<li>CY_CAPSENSE_STATUS_BAD_PARAM - The input parameter is invalid.</li>
<li>CY_CAPSENSE_STATUS_BAD_DATA - The processing failed.</li>
</ul>
</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd></dd></dl>
<p>An example demonstrates pipeline implementation of sensor scanning and processing: </p><div class="fragment"><div class="line"></div><div class="line">    <span class="comment">/*...*/</span></div><div class="line">    snsIndex = 0u;</div><div class="line"></div><div class="line"><span class="preprocessor">    #if (!defined(CY_IP_M0S8MSCV3))</span></div><div class="line">        <span class="comment">/* Trigger scanning */</span></div><div class="line">        Cy_CapSense_SetupWidgetExt(CY_CAPSENSE_TOUCHPAD0_WDGT_ID, snsIndex, &amp;cy_capsense_context);</div><div class="line">        Cy_CapSense_ScanExt(&amp;cy_capsense_context);</div><div class="line"><span class="preprocessor">    #else</span></div><div class="line">        <a class="code" href="group__group__capsense__high__level.html#gae3f80b48c2596c149ca0b392a9a3da62">Cy_CapSense_ScanSensor</a>(CY_CAPSENSE_TOUCHPAD0_WDGT_ID, snsIndex, &amp;cy_capsense_context);</div><div class="line"><span class="preprocessor">    #endif</span></div><div class="line"></div><div class="line">    <span class="keywordflow">for</span>(;;)</div><div class="line">    {</div><div class="line">        <span class="keywordflow">if</span> (<a class="code" href="group__group__capsense__macros__general.html#ga1bd45eed2be393b7f53c20f1bae2814e">CY_CAPSENSE_NOT_BUSY</a> == <a class="code" href="group__group__capsense__high__level.html#ga7f8739755bba6b51c274f45b569b9ba0">Cy_CapSense_IsBusy</a>(&amp;cy_capsense_context))</div><div class="line">        {</div><div class="line">            snsIndex++;</div><div class="line">            <span class="keywordflow">if</span> (snsIndex &lt; cy_capsense_context.ptrWdConfig[CY_CAPSENSE_TOUCHPAD0_WDGT_ID].numSns)</div><div class="line">            {</div><div class="line"><span class="preprocessor">                #if (!defined(CY_IP_M0S8MSCV3))</span></div><div class="line">                    <span class="comment">/* Trigger the next sensor scanning and process previous sensor */</span></div><div class="line">                    Cy_CapSense_SetupWidgetExt(CY_CAPSENSE_TOUCHPAD0_WDGT_ID, snsIndex, &amp;cy_capsense_context);</div><div class="line">                    Cy_CapSense_ScanExt(&amp;cy_capsense_context);</div><div class="line"><span class="preprocessor">                #else</span></div><div class="line">                    <a class="code" href="group__group__capsense__high__level.html#gae3f80b48c2596c149ca0b392a9a3da62">Cy_CapSense_ScanSensor</a>(CY_CAPSENSE_TOUCHPAD0_WDGT_ID, snsIndex, &amp;cy_capsense_context);</div><div class="line"><span class="preprocessor">                #endif</span></div><div class="line"></div><div class="line">                <a class="code" href="group__group__capsense__low__level.html#ga05d3f6e7d7fbef845ab4eb575e653dec">Cy_CapSense_ProcessSensorExt</a>(CY_CAPSENSE_TOUCHPAD0_WDGT_ID, snsIndex, <a class="code" href="group__group__capsense__macros__process.html#gaa84b286a4e106b5eeed0141339f7ab6b">CY_CAPSENSE_PROCESS_ALL</a>, &amp;cy_capsense_context);</div><div class="line">            }</div><div class="line">            <span class="keywordflow">else</span></div><div class="line">            {</div><div class="line">                <span class="comment">/* The last sensor is scanned already */</span></div><div class="line">                <a class="code" href="group__group__capsense__low__level.html#ga05d3f6e7d7fbef845ab4eb575e653dec">Cy_CapSense_ProcessSensorExt</a>(CY_CAPSENSE_TOUCHPAD0_WDGT_ID, snsIndex, <a class="code" href="group__group__capsense__macros__process.html#gaa84b286a4e106b5eeed0141339f7ab6b">CY_CAPSENSE_PROCESS_ALL</a>, &amp;cy_capsense_context);</div><div class="line">                <span class="comment">/* All sensors processed, therefore process only widget-related task */</span></div><div class="line">                <a class="code" href="group__group__capsense__low__level.html#gafbfe743a98bd2c24a623a2c734c03f0e">Cy_CapSense_ProcessWidgetExt</a>(CY_CAPSENSE_TOUCHPAD0_WDGT_ID, <a class="code" href="group__group__capsense__macros__process.html#ga1575721ebbdd600b13f843e068dbf282">CY_CAPSENSE_PROCESS_STATUS</a>, &amp;cy_capsense_context);</div><div class="line">                <span class="comment">/* Reset sensor index to start from the first sensor */</span></div><div class="line">                snsIndex = 0u;</div><div class="line">            }</div><div class="line">        }</div><div class="line">    }</div><div class="line">    <span class="comment">/*...*/</span></div><div class="line"></div></div><!-- fragment -->
</div>
</div>
<a id="ga55216d9c145b2ab42d7cec23960fb31e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga55216d9c145b2ab42d7cec23960fb31e">&#9670;&nbsp;</a></span>Cy_CapSense_InitializeAllBaselines()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cy_CapSense_InitializeAllBaselines </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes the baselines of all the sensors of all the widgets. </p>
<p>This function initializes baselines for all sensors and widgets in the project. It can also be used to re-initialize baselines at any time, however, note that all sensor data history information and sensor status shall be reset along with re-initialization of baseline.</p>
<p>Following functions to initialize sensor and widgets and filter history should be called after initializing baseline for proper operation of the CapSense middleware:</p><ul>
<li><a class="el" href="group__group__capsense__low__level.html#ga91d3ccdc21ed235f4e3b61a0a583c7a1" title="Performs initialization of all statuses and related modules including debounce counters and touch pos...">Cy_CapSense_InitializeAllStatuses()</a></li>
<li><a class="el" href="group__group__capsense__low__level.html#ga1fcb002d0216bb96ab818276954606e7" title="Initializes (or re-initializes) all the firmware filter history, except the baseline. ">Cy_CapSense_InitializeAllFilters()</a></li>
</ul>
<p>These functions are called by the CapSense_Enable() function, hence it is not required to use this function if above function is used.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td>The pointer to the CapSense context structure <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gae217c3d40eff007bf28add89814f17d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae217c3d40eff007bf28add89814f17d2">&#9670;&nbsp;</a></span>Cy_CapSense_InitializeWidgetBaseline()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cy_CapSense_InitializeWidgetBaseline </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>widgetId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes the baselines of all the sensors in a specific widget. </p>
<p>This function initializes baselines for all sensors in a specific widget in the project. It can also be used to re-initialize baselines at any time, however, note that all sensor data history information and sensor status should be reset along with re-initialization of baseline.</p>
<p>The following functions to initialize sensor and widgets and filter history should be called after initializing baselines for proper operation of middleware.</p><ul>
<li><a class="el" href="group__group__capsense__low__level.html#ga0cd8087cced318d7a2ddd0aabe5d0b65" title="Performs initialization of all statuses, debounce counters, and touch positions of the specified widg...">Cy_CapSense_InitializeWidgetStatus()</a></li>
<li><a class="el" href="group__group__capsense__low__level.html#ga101174469c4b6a2df8d44bddb0e33fcf" title="Initializes (or re-initializes) the raw count filter history of all the sensors in a widget specified...">Cy_CapSense_InitializeWidgetFilter()</a></li>
</ul>
<p>These functions are called by CapSense_Enable() function, hence it is not required to use this function is above function is used.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">widgetId</td><td>Specifies the ID number of the widget. A macro for the widget ID can be found in the cycfg_capsense.h file defined as CY_CAPSENSE_&lt;WIDGET_NAME&gt;_WDGT_ID.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the CapSense context structure <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga695fc72a3809224e52c8a0212835d4f7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga695fc72a3809224e52c8a0212835d4f7">&#9670;&nbsp;</a></span>Cy_CapSense_InitializeSensorBaseline()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cy_CapSense_InitializeSensorBaseline </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>widgetId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>sensorId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes the baseline of a sensor in a widget specified by the input parameters. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">widgetId</td><td>Specifies the ID number of the widget. A macro for the widget ID can be found in the cycfg_capsense.h file defined as CY_CAPSENSE_&lt;WIDGET_NAME&gt;_WDGT_ID.</td></tr>
    <tr><td class="paramname">sensorId</td><td>Specifies the ID number of the sensor within the widget. A macro for the sensor ID within a specified widget can be found in the cycfg_capsense.h file defined as CY_CAPSENSE_&lt;WIDGET_NAME&gt;_SNS&lt;SENSOR_NUMBER&gt;_ID.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the CapSense context structure <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga1fcb002d0216bb96ab818276954606e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1fcb002d0216bb96ab818276954606e7">&#9670;&nbsp;</a></span>Cy_CapSense_InitializeAllFilters()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cy_CapSense_InitializeAllFilters </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes (or re-initializes) all the firmware filter history, except the baseline. </p>
<p>Calling this function is accompanied by</p><ul>
<li><a class="el" href="group__group__capsense__low__level.html#ga91d3ccdc21ed235f4e3b61a0a583c7a1" title="Performs initialization of all statuses and related modules including debounce counters and touch pos...">Cy_CapSense_InitializeAllStatuses()</a></li>
<li><a class="el" href="group__group__capsense__low__level.html#ga55216d9c145b2ab42d7cec23960fb31e" title="Initializes the baselines of all the sensors of all the widgets. ">Cy_CapSense_InitializeAllBaselines()</a></li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td>The pointer to the CapSense context structure <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga101174469c4b6a2df8d44bddb0e33fcf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga101174469c4b6a2df8d44bddb0e33fcf">&#9670;&nbsp;</a></span>Cy_CapSense_InitializeWidgetFilter()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cy_CapSense_InitializeWidgetFilter </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>widgetId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes (or re-initializes) the raw count filter history of all the sensors in a widget specified by the input parameter. </p>
<p>Calling this function is accompanied by</p><ul>
<li><a class="el" href="group__group__capsense__low__level.html#ga0cd8087cced318d7a2ddd0aabe5d0b65" title="Performs initialization of all statuses, debounce counters, and touch positions of the specified widg...">Cy_CapSense_InitializeWidgetStatus()</a>.</li>
<li><a class="el" href="group__group__capsense__low__level.html#gae217c3d40eff007bf28add89814f17d2" title="Initializes the baselines of all the sensors in a specific widget. ">Cy_CapSense_InitializeWidgetBaseline()</a>.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">widgetId</td><td>Specifies the ID number of the widget. A macro for the widget ID can be found in the cycfg_capsense.h file defined as CY_CAPSENSE_&lt;WIDGET_NAME&gt;_WDGT_ID.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the CapSense context structure <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga76d2e232d2e5247954a15a45de62d235"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga76d2e232d2e5247954a15a45de62d235">&#9670;&nbsp;</a></span>Cy_CapSense_UpdateAllBaselines()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__capsense__structures.html#gadb42bb859316b21e708ad01184fba9c7">cy_capsense_status_t</a> Cy_CapSense_UpdateAllBaselines </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Updates the baseline for all the sensors in all the widgets. </p>
<p>Baselines must be updated after sensor scan to ignore low frequency changes in the sensor data caused by environment changes such as temperature from sensor status decision.</p>
<p>This function ignores the widget enable bit in the widget status register. Calling this function multiple times without a new sensor scan leads to unexpected behavior and should be avoided.</p>
<p>This function is called by <a class="el" href="group__group__capsense__high__level.html#ga2a185db228d5cae975fbc92bd3bc6367" title="Performs full data processing of all enabled widgets. ">Cy_CapSense_ProcessAllWidgets()</a> and <a class="el" href="group__group__capsense__high__level.html#ga52874ea98333723ec92aef1bb4791a7d" title="Performs full data processing of the specified widget if it is enabled. ">Cy_CapSense_ProcessWidget()</a>, hence the application program need not use this function if any of the above functions is already used. This function can be used for custom application implementation.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td>The pointer to the CapSense context structure <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns the status of the update baseline operation of all the widgets:<ul>
<li>CY_CAPSENSE_STATUS_SUCCESS - The operation is successfully completed.</li>
<li>CY_CAPSENSE_STATUS_BAD_DATA - The baseline processing failed. </li>
</ul>
</dd></dl>

</div>
</div>
<a id="ga53420b198a6de128b82b3edb31f250c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga53420b198a6de128b82b3edb31f250c6">&#9670;&nbsp;</a></span>Cy_CapSense_UpdateWidgetBaseline()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__capsense__structures.html#gadb42bb859316b21e708ad01184fba9c7">cy_capsense_status_t</a> Cy_CapSense_UpdateWidgetBaseline </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>widgetId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Updates the baselines for all the sensors in a widget specified by the input parameter. </p>
<p>This function performs exactly the same tasks as <a class="el" href="group__group__capsense__low__level.html#ga76d2e232d2e5247954a15a45de62d235" title="Updates the baseline for all the sensors in all the widgets. ">Cy_CapSense_UpdateAllBaselines()</a> but only for a specified widget.</p>
<p>Calling this function multiple times without a new sensor scan leads to unexpected behavior and should be avoided. The application program need not use this function if the <a class="el" href="group__group__capsense__low__level.html#ga76d2e232d2e5247954a15a45de62d235" title="Updates the baseline for all the sensors in all the widgets. ">Cy_CapSense_UpdateAllBaselines()</a>, <a class="el" href="group__group__capsense__high__level.html#ga2a185db228d5cae975fbc92bd3bc6367" title="Performs full data processing of all enabled widgets. ">Cy_CapSense_ProcessAllWidgets()</a> or <a class="el" href="group__group__capsense__high__level.html#ga52874ea98333723ec92aef1bb4791a7d" title="Performs full data processing of the specified widget if it is enabled. ">Cy_CapSense_ProcessWidget()</a> functions are already used.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">widgetId</td><td>Specifies the ID number of the widget. A macro for the widget ID can be found in the cycfg_capsense.h file defined as CY_CAPSENSE_&lt;WIDGET_NAME&gt;_WDGT_ID.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the CapSense context structure <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns the status of the specified widget update baseline operation:<ul>
<li>CY_CAPSENSE_STATUS_SUCCESS - The operation is successfully completed.</li>
<li>CY_CAPSENSE_STATUS_BAD_DATA - The baseline processing failed. </li>
</ul>
</dd></dl>

</div>
</div>
<a id="ga4d2ceb23fa0e3731878ad777f39474d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4d2ceb23fa0e3731878ad777f39474d2">&#9670;&nbsp;</a></span>Cy_CapSense_UpdateSensorBaseline()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__capsense__structures.html#gadb42bb859316b21e708ad01184fba9c7">cy_capsense_status_t</a> Cy_CapSense_UpdateSensorBaseline </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>widgetId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>sensorId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Updates the baseline for a sensor in a widget specified by the input parameters. </p>
<p>This function performs exactly the same tasks as <a class="el" href="group__group__capsense__low__level.html#ga76d2e232d2e5247954a15a45de62d235" title="Updates the baseline for all the sensors in all the widgets. ">Cy_CapSense_UpdateAllBaselines()</a> and <a class="el" href="group__group__capsense__low__level.html#ga53420b198a6de128b82b3edb31f250c6" title="Updates the baselines for all the sensors in a widget specified by the input parameter. ">Cy_CapSense_UpdateWidgetBaseline()</a> but only for a specified sensor.</p>
<p>Calling this function multiple times without a new sensor scan leads to unexpected behavior and should be avoided. The application need not use this function if the Cy_CapSense_UpdateWidgetBaseline (), Cy_CapSense_UpdateAllBaselines (), <a class="el" href="group__group__capsense__high__level.html#ga2a185db228d5cae975fbc92bd3bc6367" title="Performs full data processing of all enabled widgets. ">Cy_CapSense_ProcessAllWidgets()</a>, or <a class="el" href="group__group__capsense__high__level.html#ga52874ea98333723ec92aef1bb4791a7d" title="Performs full data processing of the specified widget if it is enabled. ">Cy_CapSense_ProcessWidget()</a> functions are already used.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">widgetId</td><td>Specifies the ID number of the widget. A macro for the widget ID can be found in the cycfg_capsense.h file defined as CY_CAPSENSE_&lt;WIDGET_NAME&gt;_WDGT_ID.</td></tr>
    <tr><td class="paramname">sensorId</td><td>Specifies the ID number of the sensor within the widget. A macro for the sensor ID within a specified widget can be found in the cycfg_capsense.h file defined as CY_CAPSENSE_&lt;WIDGET_NAME&gt;_SNS&lt;SENSOR_NUMBER&gt;_ID.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the CapSense context structure <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns the status of the specified sensor update baseline operation:<ul>
<li>CY_CAPSENSE_STATUS_SUCCESS - The operation is successfully completed.</li>
<li>CY_CAPSENSE_STATUS_BAD_DATA - The baseline processing failed. </li>
</ul>
</dd></dl>

</div>
</div>
<a id="ga1a42bc8b8c045d4c4fa3ea9b4411c247"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1a42bc8b8c045d4c4fa3ea9b4411c247">&#9670;&nbsp;</a></span>Cy_CapSense_InitializeWidgetGestures()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cy_CapSense_InitializeWidgetGestures </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>widgetId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Performs initialization of all gestures for the specified widget. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">widgetId</td><td>Specifies the ID number of the widget. A macro for the widget ID can be found in the cycfg_capsense.h file defined as CY_CAPSENSE_&lt;WIDGET_NAME&gt;_WDGT_ID.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the CapSense context structure <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga91d3ccdc21ed235f4e3b61a0a583c7a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga91d3ccdc21ed235f4e3b61a0a583c7a1">&#9670;&nbsp;</a></span>Cy_CapSense_InitializeAllStatuses()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cy_CapSense_InitializeAllStatuses </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Performs initialization of all statuses and related modules including debounce counters and touch positions of all the widgets. </p>
<p>The initialization includes the following tasks:</p><ul>
<li>Reset the debounce counters of all the widgets.</li>
<li>Reset the number of touches.</li>
<li>Reset the position filter history for slider and touchpad widgets.</li>
<li>Clear all status of widgets and sensors.</li>
<li>Enable all the widgets.</li>
</ul>
<p>Calling this function is accompanied by</p><ul>
<li><a class="el" href="group__group__capsense__low__level.html#ga55216d9c145b2ab42d7cec23960fb31e" title="Initializes the baselines of all the sensors of all the widgets. ">Cy_CapSense_InitializeAllBaselines()</a>.</li>
<li><a class="el" href="group__group__capsense__low__level.html#ga1fcb002d0216bb96ab818276954606e7" title="Initializes (or re-initializes) all the firmware filter history, except the baseline. ">Cy_CapSense_InitializeAllFilters()</a>.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td>The pointer to the CapSense context structure <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga0cd8087cced318d7a2ddd0aabe5d0b65"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0cd8087cced318d7a2ddd0aabe5d0b65">&#9670;&nbsp;</a></span>Cy_CapSense_InitializeWidgetStatus()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cy_CapSense_InitializeWidgetStatus </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>widgetId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Performs initialization of all statuses, debounce counters, and touch positions of the specified widget. </p>
<p>The initialization includes:</p><ul>
<li>Resets the debounce counter of the widget.</li>
<li>Resets the number of touches.</li>
<li>Resets the position filter history for slider and touchpad widgets.</li>
<li>Clears widget and sensor statuses.</li>
<li>Enables the widget.</li>
</ul>
<p>The Button and Matrix Button widgets have individual debounce counters per sensor for the CSD widgets and per node for the CSX widgets.</p>
<p>The Slider and Touchpad widgets have a single debounce counter per widget.</p>
<p>The Proximity widget has two debounce counters per sensor. One is for the proximity event and the second is for the touch event.</p>
<p>All debounce counters during initialization are set to the value of the onDebounce widget parameter.</p>
<p>Calling this function is accompanied by</p><ul>
<li><a class="el" href="group__group__capsense__low__level.html#gae217c3d40eff007bf28add89814f17d2" title="Initializes the baselines of all the sensors in a specific widget. ">Cy_CapSense_InitializeWidgetBaseline()</a>.</li>
<li><a class="el" href="group__group__capsense__low__level.html#ga101174469c4b6a2df8d44bddb0e33fcf" title="Initializes (or re-initializes) the raw count filter history of all the sensors in a widget specified...">Cy_CapSense_InitializeWidgetFilter()</a>.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">widgetId</td><td>Specifies the ID number of the widget. A macro for the widget ID can be found in the cycfg_capsense.h file defined as CY_CAPSENSE_&lt;WIDGET_NAME&gt;_WDGT_ID.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the CapSense context structure <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga1130ee418f843fce4e68832efa37e28f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1130ee418f843fce4e68832efa37e28f">&#9670;&nbsp;</a></span>Cy_CapSense_CalibrateAllSlots()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__capsense__structures.html#gadb42bb859316b21e708ad01184fba9c7">cy_capsense_status_t</a> Cy_CapSense_CalibrateAllSlots </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Executes the CapDAC calibration for all the sensors in all widgets in the project to defined target values. </p>
<p>This function detects the sensing method used by each widget and performs a successive approximation search algorithm to find the appropriate reference and compensation CapDAC (if enabled) values for all sensors to make sensor raw counts closest to the defined value levels.</p>
<p>This function can be used only if the Enable CapDAC auto-calibration parameter is enabled for CSD and/or CSX widgets.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td>The pointer to the CapSense context structure <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns the status of the operation:<ul>
<li>CY_CAPSENSE_STATUS_SUCCESS - The operation is performed successfully.</li>
<li>CY_CAPSENSE_STATUS_BAD_PARAM - The input parameter is invalid.</li>
<li>CY_CAPSENSE_STATUS_CALIBRATION_FAIL - The calibration failed if software watchdog timeout occurred during any calibration scan, the scan was not completed, or resulted raw counts are outside the limits. </li>
</ul>
</dd></dl>

</div>
</div>
<a id="ga3a30f2e4cdef59eab57f589b0091d937"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3a30f2e4cdef59eab57f589b0091d937">&#9670;&nbsp;</a></span>Cy_CapSense_CalibrateAllWidgets()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__capsense__structures.html#gadb42bb859316b21e708ad01184fba9c7">cy_capsense_status_t</a> Cy_CapSense_CalibrateAllWidgets </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Calibrates CapDACs for all widgets. </p>
<p>The function is the wrapper for the <a class="el" href="group__group__capsense__low__level.html#ga1130ee418f843fce4e68832efa37e28f" title="Executes the CapDAC calibration for all the sensors in all widgets in the project to defined target v...">Cy_CapSense_CalibrateAllSlots()</a> function to provide the backward compatibility.</p>
<dl class="section note"><dt>Note</dt><dd>The function operates only in single-channel projects for a while.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td>The pointer to the CapSense context structure <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns the status of the operation:<ul>
<li>CY_CAPSENSE_STATUS_SUCCESS - The operation is performed successfully.</li>
<li>CY_CAPSENSE_STATUS_BAD_PARAM - The input parameter is invalid.</li>
<li>CY_CAPSENSE_STATUS_CALIBRATION_FAIL - The calibration failed if software watchdog timeout occurred during any calibration scan, the scan was not completed, or resulted raw counts are outside the limits. </li>
</ul>
</dd></dl>

</div>
</div>
<a id="ga889e60b9ca2470b37b37c772558f44ad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga889e60b9ca2470b37b37c772558f44ad">&#9670;&nbsp;</a></span>Cy_CapSense_CalibrateWidget()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__capsense__structures.html#gadb42bb859316b21e708ad01184fba9c7">cy_capsense_status_t</a> Cy_CapSense_CalibrateWidget </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>widgetId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Executes the CapDAC calibration for all the sensors in the specified widget to the default target value. </p>
<p>This function performs exactly the same tasks as <a class="el" href="group__group__capsense__low__level.html#ga3a30f2e4cdef59eab57f589b0091d937" title="Calibrates CapDACs for all widgets. ">Cy_CapSense_CalibrateAllWidgets()</a>, but only for a specified widget.</p>
<dl class="section note"><dt>Note</dt><dd>The function operates only in single-channel projects for a while.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">widgetId</td><td>Specifies the ID number of the widget. A macro for the widget ID can be found in the cycfg_capsense.h file defined as CY_CAPSENSE_&lt;WIDGET_NAME&gt;_WDGT_ID.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the CapSense context structure <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns the status of the operation:<ul>
<li>CY_CAPSENSE_STATUS_SUCCESS - The operation is performed successfully.</li>
<li>CY_CAPSENSE_STATUS_BAD_PARAM - The input parameter is invalid.</li>
<li>CY_CAPSENSE_STATUS_CALIBRATION_FAIL - The calibration failed if software watchdog timeout occurred during any calibration scan, the scan was not completed, or resulted raw counts are outside the limits. </li>
</ul>
</dd></dl>

</div>
</div>
<a id="gab41b4a485cc7909f7ae3add7019e0e23"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab41b4a485cc7909f7ae3add7019e0e23">&#9670;&nbsp;</a></span>Cy_Capsense_SlotPinState()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__capsense__structures.html#gadb42bb859316b21e708ad01184fba9c7">cy_capsense_status_t</a> Cy_Capsense_SlotPinState </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>slotId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcy__stc__capsense__electrode__config__t.html">cy_stc_capsense_electrode_config_t</a> *&#160;</td>
          <td class="paramname"><em>ptrEltdCfg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pinState</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Configures the desired electrode the the specified state by updating the CapSense configuration. </p>
<p>This function changes / overwrites configuration of an electrode (several pins in case the electrode is ganged to more pins) with a state provided by pinState parameter. The function does this only for the mentioned slot ID. If a pin should have the desired state during several scans, the function should be called multiple times for the each desired slot.</p>
<p>The re-configuration is possible when parameter Sensor connection method = CTRLMUX. If parameter Sensor connection method = AMUXBUS, then the function returns CY_CAPSENSE_STATUS_BAD_CONFIG. In next releases the Cy_CapSense_SetPinState() function will be provided for the AMUXBUS configuration.</p>
<p>The function changes the configuration of an electrode without storing the default state. A user is responsible to keep the default state to revert to the default settings if needed. Also, the default settings can be configured again by calling <a class="el" href="group__group__capsense__high__level.html#gade28f1f915ce6b97f13399074a819c0d" title="Initializes the CapSense firmware modules. ">Cy_CapSense_Enable()</a> function that leads to repeating CapSense Data Structure initialization, repeating DAC auto-calibration and repeating baselinning.</p>
<p>Using this function is not recommended. This function is used to implement only the user's specific use cases (as changing the CapSense default configuration).</p>
<p>Call this function from CapSense Data Structure Initialization Callback ptrEODsInitCallback. For details of how to register callback see the <a class="el" href="group__group__capsense__callbacks.html">Callbacks</a> section. That avoids repeating of DAC auto-calibration and baselining since the callback is called after CapSense Data Structure initialization but before the first initialization scan.</p>
<p>The function is a low-level function and does not perform verification of input parameters (like slot ID, pointers, etc.). For example, CY_CAPSENSE_CTRLMUX_STATE_SHIELD is not available if shield is not configured in the project.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">slotId</td><td>The desired slot ID.</td></tr>
    <tr><td class="paramname">ptrEltdCfg</td><td>The pointer to an electrode the all pins states of which will be configured as pinState parameter.</td></tr>
    <tr><td class="paramname">pinState</td><td>The desired pins state for CSX widget electrodes:<ul>
<li>CY_CAPSENSE_CTRLMUX_STATE_RX - Rx electrode.</li>
<li>CY_CAPSENSE_CTRLMUX_STATE_TX - Tx electrode.</li>
<li>CY_CAPSENSE_CTRLMUX_STATE_GND - Grounded.</li>
<li>CY_CAPSENSE_CTRLMUX_STATE_TX_NEGATIVE - Negative Tx electrode (for multi-phase TX method). The desired pins state for CSD widget electrodes:</li>
<li>CY_CAPSENSE_CTRLMUX_STATE_SNS - Self-cap sensor.</li>
<li>CY_CAPSENSE_CTRLMUX_STATE_HIGH_Z - Unconnected (high-z).</li>
<li>CY_CAPSENSE_CTRLMUX_STATE_GND - Grounded.</li>
<li>CY_CAPSENSE_CTRLMUX_STATE_SHIELD - Shield is routed to the pin.</li>
</ul>
</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the CapSense context structure <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns the status of the operation:<ul>
<li>CY_CAPSENSE_STATUS_SUCCESS - The operation is performed successfully.</li>
<li>CY_CAPSENSE_STATUS_BAD_CONFIG - The function does not suppose to be called with the current CapSense configuration. </li>
</ul>
</dd></dl>

</div>
</div>
<a id="gaa89c8ed15cddd778c2232c85300eb02d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa89c8ed15cddd778c2232c85300eb02d">&#9670;&nbsp;</a></span>Cy_CapSense_GetParam()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__capsense__structures.html#gadb42bb859316b21e708ad01184fba9c7">cy_capsense_status_t</a> Cy_CapSense_GetParam </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>paramId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t *&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>ptrTuner</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets a value of the specified parameter from the cy_capsense_tuner structure. </p>
<p>This function gets the value of the specified parameter by the paramId argument. The paramId for each register of cy_capsense_tuner is available in the cycfg_capsense.h file as CY_CAPSENSE_&lt;ParameterName&gt;_PARAM_ID. The paramId is a special enumerated value generated by the CapSense Configurator. The format of paramId is as follows:</p><ol type="1">
<li>[ byte 3 byte 2 byte 1 byte 0 ]</li>
<li>[ RRRRRUTT IIIIIIII MMMMMMMM LLLLLLLL ]</li>
<li>U - indicates if the parameter affects the RAM Widget Object CRC.</li>
<li>T - encodes the parameter type:<ul>
<li>01b: uint8_t</li>
<li>10b: uint16_t</li>
<li>11b: uint32_t</li>
</ul>
</li>
<li>I - specifies that the widgetId parameter belongs to.</li>
<li>M,L - the parameter offset MSB and LSB accordingly in cy_capsense_tuner.</li>
<li>R - reserved</li>
</ol>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">paramId</td><td>Specifies the ID of parameter to get its value. A macro for the parameter ID can be found in the cycsg_capsense.h file defined as CY_CAPSENSE_&lt;ParameterName&gt;_PARAM_ID.</td></tr>
    <tr><td class="paramname">value</td><td>The pointer to a variable to be updated with the obtained value.</td></tr>
    <tr><td class="paramname">ptrTuner</td><td>The pointer to the cy_capsense_tuner variable of cy_stc_capsense_tuner_t. The cy_capsense_tuner is declared in CapSense Configurator generated files:<ul>
<li>cycfg_capsense.c/h</li>
</ul>
</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the CapSense context structure <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns the status of the operation. If CY_CAPSENSE_STATUS_SUCCESS is not received, either paramId is invalid or ptrTuner is null. </dd></dl>

</div>
</div>
<a id="ga6049654627a08e866ebe5e93ac414177"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6049654627a08e866ebe5e93ac414177">&#9670;&nbsp;</a></span>Cy_CapSense_SetParam()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__capsense__structures.html#gadb42bb859316b21e708ad01184fba9c7">cy_capsense_status_t</a> Cy_CapSense_SetParam </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>paramId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>ptrTuner</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets a new value for the specified parameter in cy_capsense_tuner structure. </p>
<p>This function sets the value of the specified parameter by the paramId argument. The paramId for each register of cy_capsense_tuner is available in the cycfg_capsense.h file as CY_CAPSENSE_&lt;ParameterName&gt;_PARAM_ID. The paramId is a special enumerated value generated by the CapSense Configurator. The format of paramId is as follows:</p><ol type="1">
<li>[ byte 3 byte 2 byte 1 byte 0 ]</li>
<li>[ RRRRRUTT IIIIIIII MMMMMMMM LLLLLLLL ]</li>
<li>U - indicates if the parameter affects the RAM Widget Object CRC.</li>
<li>T - encodes the parameter type:<ul>
<li>01b: uint8_t</li>
<li>10b: uint16_t</li>
<li>11b: uint32_t</li>
</ul>
</li>
<li>I - specifies that the widgetId parameter belongs to</li>
<li>M,L - the parameter offset MSB and LSB accordingly in cy_capsense_tuner.</li>
<li>R - reserved</li>
</ol>
<p>This function writes specified value into the desired register without other registers update. It is application layer responsibility to keep all the data structure registers aligned. Repeated call of <a class="el" href="group__group__capsense__high__level.html#gade28f1f915ce6b97f13399074a819c0d" title="Initializes the CapSense firmware modules. ">Cy_CapSense_Enable()</a> function helps aligning dependent register values.</p>
<p>This function updates also the widget CRC field if Built-in Self-test is enabled and paramId requires that.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">paramId</td><td>Specifies the ID of parameter to set its value. A macro for the parameter ID can be found in the cycsg_capsense.h file defined as CY_CAPSENSE_&lt;ParameterName&gt;_PARAM_ID.</td></tr>
    <tr><td class="paramname">value</td><td>Specifies the new parameter's value.</td></tr>
    <tr><td class="paramname">ptrTuner</td><td>The pointer to the cy_capsense_tuner variable of cy_stc_capsense_tuner_t. The cy_capsense_tuner is declared in CapSense Configurator generated files:<ul>
<li>cycfg_capsense.c/h</li>
</ul>
</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the CapSense context structure <a class="el" href="structcy__stc__capsense__context__t.html">cy_stc_capsense_context_t</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns the status of the operation. If CY_CAPSENSE_STATUS_SUCCESS is not received, the parameter was not updated with the new value, either paramId is invalid or ptrTuner is null. </dd></dl>

</div>
</div>
<a id="ga2de812825cd421ee05fec733206e157a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2de812825cd421ee05fec733206e157a">&#9670;&nbsp;</a></span>Cy_CapSense_GetCRC()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t Cy_CapSense_GetCRC </td>
          <td>(</td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>ptrData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Calculates CRC for the specified buffer and length. </p>
<p>This API is used for the CRC protection of a packet received from the CapSense Tuner tool and for BIST operations. CRC polynomial is 0xAC9A. It has a Hamming distance 5 for data words up to 241 bits.</p>
<p>Reference: "P. Koopman, T. Chakravarthy,
"Cyclic Redundancy Code (CRC) Polynomial Selection for Embedded Networks",
The International Conference on Dependable Systems and Networks, DSN-2004"</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ptrData</td><td>The pointer to the data.</td></tr>
    <tr><td class="paramname">len</td><td>The length of the data in bytes.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns a calculated CRC-16 value. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>CapSense Middleware Library 3.0 (Alpha)</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
